package com.commons.utils.enums;

public enum  CodeBiEnum {

    ONE(1,"旧邮箱修改密码"),TWO(2,"通过邮箱修改密码");

    private final Integer code;
    private final String description;

    CodeBiEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

    public Integer getCode() {
        return code;
    }

    public static CodeBiEnum find(Integer code){
        for(CodeBiEnum value:CodeBiEnum.values()){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }
}
